import http from '@/utils/request';
import userSotre from '@/store/user';
const userPinia = userSotre()
export default {
	// 获取商户首页数据
	getShopData: () => {
		return http.get<any>('/wx/v1/business/businessHomePage', {})
	},
	//修改商户营业状态
	getShopStatus: (data) => {
		return http.put('/wx/v1/business/updateBusinessState', data)
	},
	getShopListAll: (params) => { //获取店铺列表
		return http.get('/wx/v1/business/listIdNameVo', {
			params
		})
	},
	getShopAllList: (params) => {  //查看店铺列表
		return http.get('/wx/v1/business/listIdNameVo', {
			params
		})
	},
	getShopStateData: (params) => {   //服务员/商户管理员(根据商户)  查看统计数据
		return http.get('/wx/v1/order/getStatisticsData', {
			params
		})
	},
	setShopDetal: (data) => {//更新店铺资料
		return http.put('/wx/v1/business/setBusinessInfo', data)
	},
	getShopDetal: () => {//获取店铺资料
		return http.get('/wx/v1/business', {})
	},
	getBuisnessInfo: (params) => {//获取商户位置
		return http.get('/wx/v1/business', {
			params
		})
	},
	setBusinessAddress: (data) => {//设置商户位置
		return http.put('/wx/v1/business/setBusinessAddress', data)
	},
	getCashOutAmount: () => {//资金管理
		return http.get('/wx/v1/userAccount/getUserAccount', {})
	},
	getCashOutPage: (params) => {//收入明细
		return http.get('/wx/v1/orderSplitInfo/page', {
			params
		})
	},
	getCashOutDetail:(params)=>{
		return http.get('/wx/v1/orderSplitInfo', {
			params
		})
	},
	statistics:(params)=>{//用户金额统计
	    return http.get('/wx/v1/cashRecord/statistics', {})
	},
	cashRecordList:(params)=>{//提现记录查询
		return http.get('/wx/v1/cashRecord/page',{params})
	},
	cashOut: (params) => {//提现
		return http.get('/api/offlinePayment', {
			params
		})
	},
	getOrderShopList: (params) => {//下单店铺查询
		return http.get('/wx/v1/business/listIdName', { params })
	},
	goodsList: (params) => {//产品列表
		return http.get('/wx/v1/goods/page', { params })
	},
	businessVillageList: (params) => {
		return http.get('/wx/v1/businessVillage/listIdName', { params })
	},
	setPortinfo:(data) =>{//设置店铺经营范围
		return http.put('/wx/v1/business/setPortionInfo',data)
	},
	checkOutPri:()=>{//检查是否绑定打印机
		return http.get('/wx/v1/business/checkoutPrinter', {})
	},
	listsalesman:(parmas)=>{
		return http.get("/wx/v1/salesman/page",parmas)
	},
	addSalesman:(data)=>{
		return  http.post('/wx/v1/salesman',data)
	},
	editSalesman:(data)=>{
	    return http.put('/wx/v1/salesman',data)
	},
	getSalesmanInfo:(params)=>{
	   return http.get("/wx/v1/salesman",{params})
	},
	getGoodsCategory:(params)=>{
	   return http.get("/wx/v1/businessClassify/listCheckoutData",{params})
	}
	
}
